//
// Created by 段大志 on 16/4/23.
// Copyright (c) 2016 BMProject. All rights reserved.
//

#import "DataModel.h"
#import "NSDate+Utils.h"
#import "BackgroundBizDealCell.h"
#import "UIColor+Extension.h"

@interface BackgroundBizDealCell() <UITextViewDelegate>{

}
@property (weak, nonatomic) IBOutlet UIView *bgView;//背景

@property (weak, nonatomic) IBOutlet UILabel *numLabel;



@end

@implementation BackgroundBizDealCell {

}

- (void)awakeFromNib {
    [super awakeFromNib];
    self.bgView.layer.cornerRadius = 5.0;
    self.bgView.layer.masksToBounds = YES;

    self.contentTv.layer.borderWidth = 1;
    self.contentTv.layer.borderColor = [UIColor hexValue:0x999999].CGColor;
    self.titleView.layer.borderWidth = 1;
    self.titleView.layer.borderColor = [UIColor hexValue:0x999999].CGColor;

    self.titleView.delegate = self;
}


- (void)textViewDidChange:(UITextView *)textView {
    int num = 50 - textView.text.length;
    self.numLabel.text = [[@"您还可输入" stringByAppendingString:kIntToString(num)] stringByAppendingString:@"个字符"];
    if (textView.text.length >= 50) {
        textView.text = [textView.text substringToIndex:49];
    }
}


@end